home *** CD-ROM | disk | FTP | other *** search
/ World Tours: Brazil / WorldTours: Brazil.iso / mac / content / main.dir / 00103_Script_preLoad1 < prev    next >
Text File  |  2007-04-22  |  1KB  |  41 lines

  1. property n1,n2,n3,n4,n5,n6
  2. property loading
  3. on beginsprite me
  4.   loading = [0,0,0,0,0,0]
  5.   n1=preloadNetThing(the moviepath&"chapter.txt")
  6.   n2=preloadNetThing(the moviepath&"quiz.txt")
  7.   n3=preloadNetThing(the moviepath&"config.txt")
  8.   n4=preloadNetThing(the moviepath&"main.png")
  9.   n5=preloadNetThing(the moviepath&"quiz.png")
  10.   n6=preloadNetThing(the moviepath&"video.png")
  11.   
  12. end
  13.  
  14. on exitFrame me
  15.   
  16.   if netDone(n1) then loading[1] = 1
  17.   if netDone(n2) then loading[2] = 1
  18.   if netDone(n3) then loading[3] = 1
  19.   if netDone(n4) then loading[4] = 1
  20.   if netDone(n5) then loading[5] = 1
  21.   if netDone(n6) then loading[6] = 1
  22.   
  23.   tmp = 0
  24.   repeat with i = 1 to 6
  25.     tmp = tmp + loading[i]
  26.   end repeat
  27.   
  28.   sprite(14).width = tmp  * 124 / 6
  29.   
  30.   if netDone(n1) and netDone(n2) and netDone(n3) and netDone(n4) and netDone(n5) and netDone(n6) then
  31.     importFileInto member(1, "external files"), the moviepath & "chapter.txt"
  32.     importFileInto member(2, "external files"), the moviepath & "quiz.txt"
  33.     importFileInto member(3, "external files"), the moviepath & "config.txt"
  34.     importFileInto member(7, "internal"), the moviepath & "main.png"
  35.     importFileInto member(8, "internal"), the moviepath & "video.png"
  36.     importFileInto member(9, "internal"), the moviepath & "quiz.png"    
  37.     go the frame +1
  38.   else
  39.     go the frame
  40.   end if
  41. end